<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
  <% include("/include/header3.html",{"title":"开发-站内消息"}){} %>
</head>
<body>
<!-- 正文开始 -->
<div id="app" class="layui-fluid">
  <div class="layui-card">
    <div class="layui-card-body">
      <div class="flex flex-col flex-col-center-center px-50">
        <span class="text-weight-b text-size-24 text-align-center py-5">{{form.title}}</span>
        <span class="text-size-14 mt-8">发布时间：<span class="ml-4">{{form.publishTime}}</span></span>
      </div>
    </div>
  </div>
  <div class="layui-card">
    <div class="layui-card-body">
      <div v-html="form.content" class="pa-50"></div>
    </div>
  </div>

  <t-affix>
   <t-space>
     <t-sticky-tool :offset="[-20, 30]">
       <t-sticky-item>
         <template #label>
           <div class="flex flex-col flex-col-center-center" style="height: 56px" @click="closeBtn.close">
             <i class="layui-icon text-size-20 text-weight-b" :class="closeBtn.i"></i>
             <span class="text-size-12 mt-6">{{closeBtn.t}}</span>
           </div>
         </template>
       </t-sticky-item>
     </t-sticky-tool>
   </t-space>
  </t-affix>
</div>

<script>
  const PATH_URL = "dev/messageUser/";
  const messageId = "${messageId}";

  setupVue("#app", {
    setup() {
      init(() => {
        if (messageId) {
          getInfo();
        } else {
          $baseAlert("参数错误", closeBtn.value.close());
        }
      });
      const loading = Vue.ref(false);
      const form = Vue.ref({});
      const getInfo = () => {
        $fetch(axiosGet, PATH_URL + "getInfo", { id: messageId }, form, null, loading);
      }
      const closeBtn = useCloseBtn();
      return {
        closeBtn,
        form,
      }
    },
  });


</script>
</body>
</html>
